package enums;

import service.EnumsService;

/**
 * Created by butterfly on 2018/5/24.
 */
public enum Gender implements EnumsService {
    MALE("男"){//该枚举的一个匿名内部子类，相当于创建gender的匿名子类实例。编译会生成3个class文件
        public void info(){
            System.out.println("MALE实现接口方法");
        }
    },
    FEMALE("女"){
        public void info(){
            System.out.println("FEMALE实现接口方法");
        }
    };

    private String name;

    Gender(String name) {
        this.name = name;
    }
}
